home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #6 / Amiga Plus CD - 2004 - No. 06.iso / AmigaPlus / Begleitmaterial / 50Tools / Grafik / PerfectPaint / rexx / Anim / Dissolve / Multi_Twirl < prev    next >
Text File  |  2001-10-01  |  2KB  |  114 lines

  1. /* Dissolve Circle
  2. 100
  3. */
  4.  
  5.     call addlib("rexxmathlib.library", 5, -30, 0)
  6.  
  7.     options results
  8.  
  9.     parse ARG Port Opt1 Opt2 Opt3 s0 t0 s1 t1 b
  10.     
  11.     ADDRESS value Port
  12.  
  13.     pp_GetWidth
  14.     w=result
  15.     pp_GetHeight
  16.     h=result
  17.     pp_GetDepth
  18.     D=result
  19.  
  20.     pp_GetCurrentBuffer
  21.     CBf=result
  22.     pp_GetCurrentBrush
  23.     CB=result
  24.  
  25.     pp_FindEmptyBrush
  26.     Brush=result
  27.     if Brush=-1 then DO
  28.         pp_Warn "can't*find*empty|Brush."
  29.         EXIT        
  30.     END
  31.     pp_SetBrush Brush        
  32.  
  33.     pp_FindEmptyBuffer
  34.     Bf=result
  35.     if Bf=-1 then DO
  36.         pp_Warn "can't*find*empty|Buffer."
  37.         EXIT        
  38.     END
  39.     pp_SetBuffer Bf
  40.  
  41.     pp_New w+100 h+100 24
  42.     pp_SpareOnOff
  43.  
  44.     /* Draw your Mask */
  45.         pp_setRange 0 0 0 0 0
  46.         pp_setRange 0 4 255 255 255
  47.         pp_setRange 0 8 0 0 0
  48.         pp_setRange 0 12 255 255 255
  49.         pp_setRange 0 16 0 0 0
  50.         pp_setRange 0 19 255 255 255
  51.         pp_Gradient 0 0 0 0
  52.  
  53.         pp_EffectOn
  54.         pp_ComposeReqOff
  55.         pp_BoxF 0 0 w+99 h+99
  56.         pp_Twirl 400
  57.         pp_Boxf 50 50 w+50 h+50
  58.         pp_pickBrush 50 50 w h 1
  59.         pp_new w h 24
  60.         pp_SpareOnOff
  61.         pp_pent 6
  62.         pp_Plot w/2 h/2
  63.         pp_FreeBrush
  64.         pp_ComposeReqOn
  65.         pp_EffectOff
  66.  
  67.     /*    End    */
  68.     
  69.     pp_SparetoStencil
  70.     pp_SSave "ram:DisSten"
  71.     pp_ClearCurrentBuffer
  72.     pp_SetBuffer CBf
  73.  
  74.     pp_SLoad "ram:DisSten"
  75.     ADDRESS COMMAND
  76.     'delete >nil: ram:DisSten'
  77.     ADDRESS value Port
  78.  
  79.     pp_GotoFrame s1
  80.     pp_PicttoSpare
  81.     pp_GotoFrame s0            
  82.     pp_Pickbrush 0 0 W H 1
  83.     
  84.     step=(s1-s0)
  85.     Step_f=255/Step
  86.  
  87.     DO i=s0 to s1
  88.         IF t1=1 then DO
  89.             pp_GotoFrame (s1+i-s0)
  90.             pp_PicttoSpare
  91.         END
  92.  
  93.         pp_GotoFrame i
  94.  
  95.         IF t0=0 then DO
  96.             pp_plot W/2 H/2
  97.         END
  98.  
  99.         f=Step_f*(i-s0)
  100.         IF Opt1=0 then DO
  101.             pp_Dissolve f 255            
  102.         END
  103.         ELSE DO
  104.             pp_Dissolve f f
  105.         END
  106.         pp_Refresh
  107.     END
  108.  
  109.         pp_Gotoframe s0
  110.         pp_FreeBrush
  111.         pp_SetBrush CB
  112.  
  113.     EXIT
  114.